SlkStore Class

Represents a connection to a SharePoint Learning Kit store, containing assignments, references to e-learning packages stored in SharePoint. Also contains the identity of the user accessing the store (used for authorization purposes).

Namespace: Microsoft.SharePointLearningKit

Assembly: Microsoft.SharePointLearningKit.dll

Syntax
C#

public class SlkStore

Properties
Name Description
Ð CurrentUserKey

Gets the user key used by LearningStore to identify the current user. What's contained in this string depends on the membership provider used by SharePoint (for example, Windows authentication or forms-based authentication).

Ð CurrentUserName

Gets the name of the current user.

Ð LearningStore

Gets the LearningStore of the SPSite associated with this SlkStore. LearningStore contains information about e-learning assignments, learner assignments (including SCORM attempts), and other e-learning information.

Ð Mapping

Gets the SlkSPSiteMapping of the SPSite associated with this AnonymousSlkStore.

Ð PackageStore

Gets a reference to the SharePointPackageStore associated with this SharePoint Learning Kit store. SharePointPackageStore holds references to e-learning packages stored in SharePoint document libraries.

Ð Settings

Gets the SlkSettings of the SPSite associated with this SlkStore.

Ð SharePointCacheSettings

Gets information about the file system cache used by PackageStore.

Ð SPSiteGuid

Gets the Guid of the SPSite associated with this SlkStore.

Methods
Name Description
Ð AddToUserWebList

Adds a given SPWeb to the current user's SharePoint Learning Kit user web list. If the SPWeb already exists in the user web list, it's last-access time is updated to be the current time.

Ð ChangeLearnerAssignmentState (LearnerAssignmentItemIdentifier, LearnerAssignmentState)

Changes the LearnerAssignmentState of a learner assignment.

Ð CreateAssignment

Creates a new SharePoint Learning Kit assignment.

Ð DeleteAssignment

Deletes a SharePoint Learning Kit assignment.

Ð FinishLearnerAssignment

Finishes the learner assignment.

Ð GetAssignmentProperties (AssignmentItemIdentifier, SlkRole)

Retrieves general information about an assignment.

Ð GetCurrentUserId

Returns the UserItemIdentifier of the current user. If no UserItem exists in LearningStore for the current user, one is created.

Ð GetCurrentUserLearnerAssignment

Returns the LearnerAssignmentItemIdentifier of the learner assignment belonging to the current user, for a given assignment. Returns null if the current user isn't a learner of the assignment.

Ð GetGradingProperties

Retrieves grading-related information about an assignment from the SLK database.

Ð GetLearnerAssignmentProperties

Retrieves the properties of a SharePoint Learning Kit learner assignment (i.e. information about an assignment related to a single learner) given the learner assignment's identifier.

Ð GetMemberships (SPWeb, IEnumerable<SlkUser>, IEnumerable<SlkUser>)

Retrieves the lists of instructors, learners, and learner groups from a given SharePoint SPWeb. Returns a Boolean value indicating whether information about any instructors or learners could not be retrieved.

Ð GetMemberships (SPWeb, IEnumerable<SlkUser>, IEnumerable<SlkUser>, out ReadOnlyCollection<string>, out string)

Retrieves the lists of instructors, learners, and learner groups from a given SharePoint SPWeb. Returns a Boolean value indicating whether information about any instructors or learners could not be retrieved.

Ð GetNewAssignmentDefaultProperties

Returns an AssignmentProperties object populated with default information for a new assignment based on a given e-learning package or non-e-learning document. This method doesn't actually create the assignment -- it just returns information that can be used as defaults for a form that a user would fill in to create a new assignment.

Ð GetPackageInformation (string)

Retrieves some information about an e-learning package.

ÐS GetStore

Returns the SlkStore object associated the SharePoint SPSite that a given SharePoint SPWeb belongs to. If no such object exists (i.e. if SharePoint Learning Kit was not yet configured for the specified SPSite in SharePoint Central Administration), an exception is thrown.

Ð GetUserWebList

Returns the SharePoint Learning Kit user web list for the current user.

Ð IncrementFinalPoints

Increments the final points for a learner assignment.

Ð IsInstructor

Returns true if the current user is an instructor on a given SPWeb, false if not.

Ð RegisterPackage

Registers a specified version of a given e-learning package (that's stored in a SharePoint document library) in the SharePointPackageStore associated with this SharePoint Learning Kit store, and returns its PackageItemIdentifier and content warnings. If that version -- with the same last-modified date/time -- is already registered, its information is returned rather than re-registering the package. Uses an MLC SharePoint location string to locate the package.

Ð SetAssignmentProperties

Updates general information about an assignment.

Ð SetFinalPoints

Sets the final points for a learner assignment.

Ð SetGradingProperties

Stores grading-related information about an assignment into the SLK database. The user must be an instructor on the assignment.

Ð StartAttemptOnLearnerAssignment

Starts an attempt on a learner assignment

Ð ValidatePackage

Validates a specified version of a given e-learning package (that's stored in a SharePoint document library), and returns its content warnings. If that version -- with the same last-modified date/time -- is already registered, its information is returned rather than re-validating the package. Uses an MLC SharePoint location string to locate the package.